package com.neuedu.web.controller;

import com.neuedu.web.common.BaseMethodController;
import com.neuedu.web.common.PageInfo;
import com.neuedu.web.po.UploadPO;
import com.neuedu.web.service.DeptService;
import com.neuedu.web.service.UploadService;
import com.neuedu.web.utils.StringUtils;
import com.neuedu.web.vo.DeptVO;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * @author 金山
 * 项目：his
 * site: https://blog.fulfill.com.cn
 * 描述  Dept接口
 * @data 2024-11-21 14:21:592
 */
@WebServlet(urlPatterns = "/upload/*")
public class UploadController extends BaseMethodController {

    UploadService uploadService = new UploadService();


    /**
     * 上传文件
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    private UploadPO upload(HttpServletRequest request , HttpServletResponse response) throws Exception {
        return uploadService.upload(request, response);
    }


}
